#ifndef __COLLISIONMODEL_H__
#define __COLLISIONMODEL_H__
/////////////////
//include
/////////////////
#include"Model.h"
/////////////////
//const
/////////////////

/////////////////
//class
/////////////////
struct CollisionModelMaterial
{
	CollisionModelMaterial()
	{
		diffuse = Vector3D();
		diffuse = Vector3D();
		alpha = 0;
		specularity = 0;
		specula = Vector3D();
		ambient=Vector3D();
	}
	Vector3D diffuse;
	float alpha;
	float specularity;
	Vector3D specula;
	Vector3D ambient;
	float dummy;
};
class CollisionModel
{
public:
	CollisionModel();
	~CollisionModel();
	virtual void CreateBuffer(Device* device);
	virtual void CreateShader(Device* device);
	virtual void Draw(DeviceContext* device_context);
	void	SetPos(float x,float y,float z){	pos_mat = XMMatrixTranslation(x,y,z);};
	void	SetPos(const Vector3D& pos){		pos_mat = XMMatrixTranslation(pos.x,pos.y,pos.z);};
	void	SetRot(const Vector3D& rot){		rot_mat = XMMatrixRotationX(rot.x)*XMMatrixRotationY(rot.y)*XMMatrixRotationZ(rot.z);};
	void	SetRot(float x,float y,float z){	rot_mat = XMMatrixRotationX(x)*XMMatrixRotationY(y)*XMMatrixRotationZ(z);};
	void	SetScale(const Vector3D& scale){	scale_mat = XMMatrixScaling(scale.x,scale.y,scale.z);};
	void	SetPos(const Matrix& pos_mat){		this->pos_mat = pos_mat;};
	void	SetRot(const Matrix& rot_mat){		this->rot_mat = rot_mat;};
	void	SetScale(const Matrix& scale_mat){	this->scale_mat = scale_mat;};
	void	SetScale(const float scale){		scale_mat = GetScaleMatrix(scale);};
	void	SetShader(Shader* shader){this->shader = shader;}

protected:
	ID3D11Buffer*		vertex_buffer;
	ID3D11Buffer*		index_buffer;
	ID3D11Buffer*		material_buffer;
	ID3D11Buffer*		matrix_buffer;
	ID3D11Buffer*		rot_matrix_buffer;
	Matrix				pos_mat;
	Matrix				rot_mat;
	Matrix				scale_mat;
	Shader*				shader;
	ID3D11SamplerState* sampler;
	Array<Vector3D>		vertex;
	Array<Vector3D>		index;


};
#endif __COLLISIONMODEL_H__
